module dtos.menu;

class MenuDto
{
    long id;
    long parentId;
    string name;
    string icon;
    string routeName;
    string routePath;
    string component;
    int sort;
    int visible;
    string redirect;
    string type;
    string perm;
    long createTime;
    long updateTime;
}

class MenuDto2
{
    long id;
    long parentId;
    string name;
    string icon;
    string path;
    string component;
    int sort;
    int visible;
    string redirect;
    string type;
    string perm;
}

class MultilevelMenuDto
{
    long id;
    long parentId;
    string name;
    string icon;
    string routeName;
    string routePath;
    string component;
    int sort;
    int visible;
    string redirect;
    string type;
    string perm;

    MultilevelMenuDto[] children;
}

class MenuOption
{
    long value; // id
    string label; // name

    MenuOption[] children;

    this(long value, string label)
    {
        this.value = value;
        this.label = label;
    }

    this(long value, string label, MenuOption[] children)
    {
        this.value = value;
        this.label = label;
        this.children = children;
    }
}

class MenuDtoForCreate
{
    long parentId;
    string name;
    string icon;
    string path;
    string component;
    int sort;
    string type;
    int visible;
}

class MenuDtoForUpdate
{
    long id;
    long parentId;
    string name;
    string icon;
    string path;
    string component;
    int sort;
    string redirect;
    string type;
    string perm;
    int visible;
}
